package com.maylann.ratiocheater.model;

/**
 * Created with IntelliJ IDEA.
 * by Maylann
 */
public class Task {

    private Torrent torrent;
    private Peer peer;
    private long toUpload;          // in Bytes
    private int hoursToRun;         // For how many hours should the task run
    private long toDownload;        // in Bytes
    private long speed;             // in KB/s
    private int announceInterval;   // in minutes
    private Connection connection;

    public Task(Torrent torrent, Peer peer, long toUpload, int hoursToRun, long toDownload, long speed,
                int announceInterval, Connection connection) {
        this.torrent = torrent;
        this.peer = peer;
        this.toUpload = toUpload;
        this.hoursToRun = hoursToRun;
        this.toDownload = toDownload;
        this.speed = speed;
        this.announceInterval = announceInterval;
        this.connection = connection;
    }

    public Task(Torrent torrent, long speed, Connection connection) {
        this(torrent, new Peer(), 0, 0, 0, speed, 30, connection);
    }


    public Torrent getTorrent() {
        return torrent;
    }

    public Peer getPeer() {
        return peer;
    }

    public long getToUpload() {
        return toUpload;
    }

    public int getHoursToRun() {
        return hoursToRun;
    }

    public long getToDownload() {
        return toDownload;
    }

    public long getSpeed() {
        return speed;
    }

    public int getAnnounceInterval() {
        return announceInterval;
    }

    public Connection getConnection() {
        return connection;
    }
}
